vim.cmd([[autocmd VimEnter * lua print(ZrVim)]])
return {
	{
		"folke/tokyonight.nvim",
		lazy = false,
		priority = 1000,
		dependencies = {
			"nvim-lualine/lualine.nvim",
			"nvim-tree/nvim-web-devicons",
			"utilyre/barbecue.nvim",
			"SmiteshP/nvim-navic",
		},
		-- config 可以有两种形式， 一个中是 function 一种是 table ({ })
		-- 当这个插件加载的时候，会自动运行 config 指定的 函数
		config = function()
			vim.cmd([[colorscheme tokyonight-storm]])
			require("lualine").setup({
				options = {
					theme = "tokyonight",
				},
			})
			require("barbecue").setup({
				theme = "tokyonight",
			})
		end,
		opts = {},
	},
	-- {
	-- 	"utilyre/barbecue.nvim",
	-- 	name = "barbecue",
	-- 	version = "*",
	-- 	dependencies = {
	-- 		"SmiteshP/nvim-navic",
	-- 		-- "nvim-tree/nvim-web-devicons",
	-- 	},
	-- 	opts = {
	-- 		theme = "tokyonight",
	-- 	},
	-- 	config = function()
	-- 		require("barbecue").setup()
	-- 	end,
	-- },

	-- bufferline
	-- {
	-- 	"akinsho/bufferline.nvim",
	-- 	opts = {
	-- 		options = {},
	-- 		highlights = {
	-- 			buffer_selected = { italic = false, bold = false },
	-- 		},
	-- 	},
	-- 	config = function(_, opts)
	-- 		require("bufferline").setup(opts)
	-- 		vim.api.nvim_create_autocmd("BufAdd", {
	-- 			callback = function()
	-- 				vim.schedule(function()
	-- 					pcall(nvim_bufferline)
	-- 				end)
	-- 			end,
	-- 		})
	-- 	end,
	-- 	dependencies = {
	-- 		"nvim-tree/nvim-web-devicons",
	-- 	},
	-- },
	{
		"akinsho/bufferline.nvim",
		version = "*",
		event = "VeryLazy",
		keys = {
			-- { "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin"},
			-- { "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers"},
			{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
			{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
			{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
			{ "<leader>bb", "<Cmd>BufferLinePick<CR>", desc = "Pick Buffers" },
			{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev BUffer" },
			{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
			{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
			{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
		},
		opts = {
			options = {
                -- stylua: ignore
        close_command =  "Bdelete! %d", -- function(n)  require("mini.bufremove").delete(n, false) end,
				reight_mouse_command = "Bdelete! %d", -- function(n) require("mini.bufremove").delete(n, false) end,
				diagnostics_indicator = function(_, _, diag)
					local icons = {
						Error = " ",
						Warn = " ",
						Hint = " ",
						Info = " ",
					}
					local ret = (diag.err and icons.Error .. diag.error .. " " or "")
						.. (diag.warning and icons.Warn .. diag.warning or "")
					return vim.trim(ret)
				end,
				offsets = {
					{
						filetype = "neo-tree",
						text = "File Explorer",
						highlight = "Directory",
						text_align = "left",
					},
				},
			},
		},
		dependencies = {
			"nvim-tree/nvim-web-devicons",
			"moll/vim-bbye",
		},
		config = function(_, opts)
			require("bufferline").setup(opts)
			vim.api.nvim_create_autocmd("BufAdd", {
				callback = function()
					vim.schedule(function()
						pcall(nvim_bufferline)
					end)
				end,
			})
		end,
	},

	-- 代码块标注线
	{
		"lukas-reineke/indent-blankline.nvim",
		main = "ibl",
		-- event = "LazyFile",
		opts = {
			indent = {
				char = "│",
				tab_char = "│",
			},
			scope = { enabled = false },
			exclude = {
				filetypes = {
					"help",
					"alpha",
					"dashboard",
					"neo-tree",
					"Trouble",
					"trouble",
					"lazy",
					"mason",
					"notify",
					"togglaterm",
					"lazyterm",
				},
			},
		},

		-- 彩色设置
		-- config = function()
		-- 	local highlight = {
		-- 		"RainbowRed",
		-- 		"RainbowYellow",
		-- 		"RainbowBlue",
		-- 		"RainbowOrange",
		-- 		"RainbowGreen",
		-- 		"RainbowViolet",
		-- 		"RainbowCyan",
		-- 	}
		-- 	local hooks = require("ibl.hooks")
		-- 	hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
		-- 		vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
		-- 		vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
		-- 		vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
		-- 		vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
		-- 		vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
		-- 		vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
		-- 		vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
		-- 	end)
		-- 	require("ibl").setup({
		-- 		indent = { highlight = highlight },
		-- 	})
		-- end,
	},
	{
		"lewis6991/gitsigns.nvim",
		config = true,
	},
	{
		"goolord/alpha-nvim",
		event = "VimEnter",
		dependencies = {
			"nvim-tree/nvim-web-devicons",
		},
		config = function()
			require("alpha").setup(require("alpha.themes.dashboard").config)
		end,
	},
	{
		--# 高亮当前文档中相同的词
		"RRethy/vim-illuminate",
		config = function()
			-- 这里调用的 configure, 不是setup，文档中他就是这样
			require("illuminate").configure()
		end,
	},

	{
		"folke/noice.nvim",
		event = "VeryLazy",
		opts = {},
		dependencies = {
			"MunifTanjim/nui.nvim",
			"rcarriga/nvim-notify",
		},
		config = function()
			require("noice").setup({
				presets = {
					bottom_search = false,
					command_palette = false,
					long_message_to_split = false,
					inc_rename = false,
				},
			})
		end,
	},
	{
		"folke/noice.nvim",
		event = "VeryLazy",
		opts = {},
		dependencies = {
			"MunifTanjim/nui.nvim",
			"rcarriga/nvim-notify",
		},
		config = function()
			require("noice").setup({
                cmdline = {
                    view = "cmdline",
                }, 
				views = {
					-- cmdline_popup = {
					-- 	position = {
					-- 		row = 5,
					-- 		col = "50%",
					-- 	},
					-- 	size = {
					-- 		width = 60,
					-- 		height = "auto",
					-- 	},
					-- },
					popupmenu = {
						relative = "editor",
						position = {
							row = 8,
							col = "50%",
						},
						size = {
							width = 60,
							height = 10,
						},
						border = {
							style = "rounded",
							padding = { 0, 1 },
						},
						win_options = {
							winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
						},
					},
				},
				routes = {
					{
						view = "notify",
						filter = { event = "msg_showmode" },
					},
				},
			})
		end,
	},
}
